import React from "react";
import { Button, Checkbox, Col, Form, InputNumber, Radio, Rate, Space, Row, Select, Slider, Switch, Upload, message } from "antd";
import { CommonModal } from "@/views/components/CommonModal";
const ProductSynchronizationUpdate = ({ list, RefForm, handleOk, onCancel }) => {
	const [form] = Form.useForm();
	const onOk = name => {
		const { updataList } = form.getFieldsValue();
		handleOk(name, updataList);
		// console.log("updataList", updataList);
	};
	return (
		<CommonModal
			title={{ title: "商品信息同步更新" }}
			open={true}
			width="396px"
			minHeight={"auto"}
			zIndex={1112}
			onOk={onOk}
			onCancel={onCancel}
			footer={
				<Row justify="space-between">
					<Col></Col>
					<Col>
						<Space>
							<Button
								size="middle"
								onClick={() => {
									onCancel();
								}}
							>
								取消
							</Button>
							<Button
								size="middle"
								type="primary"
								onClick={() => {
									onOk("确定");
								}}
							>
								确定
							</Button>
						</Space>
					</Col>
				</Row>
			}
		>
			<div style={{ lineHeight: "20.5px", fontSize: 14, marginBottom: 16 }}>
				款式中以下商品信息与SKU不一致，如需同步更新，可勾选后更新到SKU中
			</div>
			<Form form={form}>
				<Form.Item noStyle name={"updataList"} style={{ marginBottom: 0 }}>
					<Checkbox.Group
						options={list.map(e => {
							return {
								label: e.name,
								value: e.prop,
								disabled: false
							};
						})}
					/>
				</Form.Item>
			</Form>
		</CommonModal>
	);
};
export default ProductSynchronizationUpdate;
